{$layout}

<h3>添加请求Header</h3>
<p class="comment" style="padding-top: 0">添加的Header在转发请求到后端服务器时会加上这些信息。</p>

<form  class="ui form" data-tea-action="$" data-tea-success="addSuccess">
    <input type="hidden" name="serverId" :value="server.id"/>
    <input type="hidden" name="locationId" :value="locationId"/>
    <input type="hidden" name="rewriteId" :value="rewriteId"/>
    <input type="hidden" name="backendId" :value="backendId"/>
    <input type="hidden" name="fastcgiId" :value="fastcgiId"/>
    <table class="ui table definition selectable">
        <tr>
            <td class="title">名称<em>（Name）</em></td>
            <td>
                <input type="text" name="name" placeholder="类似于 Server、Content-Type之类" maxlength="100"/>
            </td>
        </tr>
        <tr>
            <td>值<em>（Value）</em></td>
            <td>
                <input type="text" name="value" placeholder="" maxlength="1024"/>
                <p class="comment"><a href="http://teaos.cn/doc/proxy/Variables.md#%E8%AF%B7%E6%B1%82%E7%9B%B8%E5%85%B3%E5%8F%98%E9%87%8F" target="_blank">在这里查看支持的内置变量</a>。</p>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <a href="" style="font-weight: normal;" v-if="!advancedOptionsVisible" @click.prevent="showAdvancedOptions()">更多选项 <i class="icon angle down"></i> </a>
                <a href="" style="font-weight: normal;" v-if="advancedOptionsVisible" @click.prevent="showAdvancedOptions()">收起选项 <i class="icon angle up"></i> </a>
            </td>
        </tr>
        <tbody v-show="advancedOptionsVisible">
            <tr>
                <td>是否启用</td>
                <td>
                    <div class="ui checkbox">
                        <input type="checkbox" name="on" value="1" checked="checked"/>
                        <label></label>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <button class="ui button primary" type="submit">保存</button> &nbsp; <a :href="from">返回</a>
</form>